UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '23HqyahUv4Af5KGvmhSsK8KQn8a8y8+24PI8nzeHC3w='
WHERE
key_id = '7aba827e4938f5d8319cbd5a0ec492ac6374b9fc7b5fdbd254f0de3cd8ea6ac8'
AND (
token = '23HqyahUv4Af5KGvmhSsK8KQn8a8y8+24PI8nzeHC3w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)