UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LwaKmQux8rK7YK1AxJyp872Tj9BG5lQBj8tify0SRS4='
WHERE
key_id = '11e072fa79946bb2e0780e8c46a7ee0a754936a532d7f14c5b4e6f66b4113d05'
AND (
token = 'LwaKmQux8rK7YK1AxJyp872Tj9BG5lQBj8tify0SRS4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)