UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kqTYJwgMx+itK1lEgi1fP4lsyXQg3cJFq8Pvdh8Swyg='
WHERE
key_id = '7eedbb9163e9f0a732c8f01cc7e203cbb2121622289b11696b7cfd9d559b3833'
AND (
token = 'kqTYJwgMx+itK1lEgi1fP4lsyXQg3cJFq8Pvdh8Swyg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)