UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4JiKb25OsC9gxS/aFZMG15mlCnsRXQt4KZExHcKXl38='
WHERE
key_id = 'a4efb910cd91b95d2c5a8e93fe9c13423f34ed406a6bc6857a811fed1a211da9'
AND (
token = '4JiKb25OsC9gxS/aFZMG15mlCnsRXQt4KZExHcKXl38='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)