UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'io/r/P8l3/mAdq720Y7Itl/q4w3OvZdXsydbS4cK47A='
WHERE
key_id = '6798546515de62a63ecdcc08ad34fde93e7aa834e6d2645100316254b336a5ac'
AND (
token = 'io/r/P8l3/mAdq720Y7Itl/q4w3OvZdXsydbS4cK47A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)