UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's5zopqO364YyWzHwtKumteThiaVKh9pByVgB1qizdXw='
WHERE
key_id = '653786ca85b314f24d4eaba2a5143021afa399bc0714286860c9f16e6fd27d37'
AND (
token = 's5zopqO364YyWzHwtKumteThiaVKh9pByVgB1qizdXw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)