UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rqVnGOqxAqdFuZstYH86lDpHdk5ZIHXXT1EtC7uABr8='
WHERE
key_id = '191dfa2d36e3facf9f92b362fb78284237b7edbcb239cca660c771183319c9b6'
AND (
token = 'rqVnGOqxAqdFuZstYH86lDpHdk5ZIHXXT1EtC7uABr8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)