UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4SGl5hs1kVkQs1YGeTiYu+YJZCTxg7755eNwuqIUYW8='
WHERE
key_id = '6d1a4eadd147af3a28ecb6fd7f0e01fb35a26d0475381dd882fb6abba906b92e'
AND (
token = '4SGl5hs1kVkQs1YGeTiYu+YJZCTxg7755eNwuqIUYW8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)