UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l10jlb6t90MqL//OZCKCIPWUKJmKGbmEcrxyYaENW2g='
WHERE
key_id = '6dda8de99d6ebbaf5ea7132d43c19a98dc607fc56c8eac701381ee76985a083b'
AND (
token = 'l10jlb6t90MqL//OZCKCIPWUKJmKGbmEcrxyYaENW2g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)