UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SsUtussPzOtP/oqf/95BVu670ijWrmIXs7jRmLlcIvs='
WHERE
key_id = 'f3bc73db783a5504b9ef0fa14698312a9a53379cd17cf0f203eebc725bc426a7'
AND (
token = 'SsUtussPzOtP/oqf/95BVu670ijWrmIXs7jRmLlcIvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)