UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F1umSbw6FKUlLc1WI10OSSbzaqKEskVXUxZaKyvD4MU='
WHERE
key_id = '33d91374f205827352e6e4d1849adcebd25d6acbff00d7328f82424537d82833'
AND (
token = 'F1umSbw6FKUlLc1WI10OSSbzaqKEskVXUxZaKyvD4MU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)