UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xkRH2vXAEDkIWtsWUAGb8VwVF9qLKTdXMLCt3gQwD4c='
WHERE
key_id = '64cbfcff1ca2bd5ac71aefb6ba50ab6e468304fb663f618fabb63362eba010a0'
AND (
token = 'xkRH2vXAEDkIWtsWUAGb8VwVF9qLKTdXMLCt3gQwD4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)