UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PxLQ39V27TR1JbzwalV+T/262wZTwlklPxdWMbnr7vc='
WHERE
key_id = '04d838e9e239ee2409532bfebc6285a7c079bc40c6078fae8d1eb06089180cd3'
AND (
token = 'PxLQ39V27TR1JbzwalV+T/262wZTwlklPxdWMbnr7vc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)