UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rbUH2GhOywcQTSmDo9813J4oq6w0F82haPGGxYajuHA='
WHERE
key_id = '2190682bfd004324846b39728ac797fed3f553b880107c77e1eae99c08357f4d'
AND (
token = 'rbUH2GhOywcQTSmDo9813J4oq6w0F82haPGGxYajuHA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)