UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '84EZTOd+MPRm+lJ3ui/GnRmnt9XNox6LauNn3GZKbjs='
WHERE
key_id = 'fe43b5bbb1a9429f6e0c677bb4e605040a13155484136cb4e88823fd1fe2388a'
AND (
token = '84EZTOd+MPRm+lJ3ui/GnRmnt9XNox6LauNn3GZKbjs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)