UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eohjcuocp+Fot0Rmd5T74c0sdZxo/DTk3qdPcZS9AB8='
WHERE
key_id = 'd7141eaf7bb88a9f04b01091a4ab36a986588f1c8fc9ce9711613fb13100ae8f'
AND (
token = 'eohjcuocp+Fot0Rmd5T74c0sdZxo/DTk3qdPcZS9AB8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)