UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cvdyUF1Wc5vCVH4WR1EV44Ihc76xhCtl0iXNZmxeP7E='
WHERE
key_id = 'e439840498c3adae33f1acfd6b180febe98a0262583ed37f15e6f7b263e413f7'
AND (
token = 'cvdyUF1Wc5vCVH4WR1EV44Ihc76xhCtl0iXNZmxeP7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)