UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yAZSmLZhc9xqQpSG0RQ0rF7xMGwVr8sNP2/JrK/kPaA='
WHERE
key_id = '9b093c8240a78a80ee06ea0bba769a9220314adb623bea8099aad0fff3964a2c'
AND (
token = 'yAZSmLZhc9xqQpSG0RQ0rF7xMGwVr8sNP2/JrK/kPaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)