UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZsvZHRyvKq+lD5jemzDawB7KU7rXwEZtkMXIAllClyI='
WHERE
key_id = 'c9b27090722ace3dc5f0ab3b7a800418d33fdec5eed5f38b2a830730e9405255'
AND (
token = 'ZsvZHRyvKq+lD5jemzDawB7KU7rXwEZtkMXIAllClyI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)