UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W88RXhTWaIGlyTfhJ1DGxUTMg3W015h3Qhd/QIiROk4='
WHERE
key_id = '76696cbe0b48480d9d9d7f09491371b87464bd108f1406c3fbfd959b89c2eb73'
AND (
token = 'W88RXhTWaIGlyTfhJ1DGxUTMg3W015h3Qhd/QIiROk4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)