UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WQFyzTaiBy1+D6UBufjAzcfL+LcUTxZc8mJq5XnqUG0='
WHERE
key_id = '63b2c5e266b5557de68b5d4796741d185077331592d24fd435b017602f21f581'
AND (
token = 'WQFyzTaiBy1+D6UBufjAzcfL+LcUTxZc8mJq5XnqUG0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)