UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3MA3rKCEZjxZOa3MVixwh44/27CS1a0rIfdMQYyt5uo='
WHERE
key_id = '439d6842ebbc37f9ecdcadfeacbbab1def074d4e80c8aa1c97ef3cacb86521c6'
AND (
token = '3MA3rKCEZjxZOa3MVixwh44/27CS1a0rIfdMQYyt5uo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)