UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2hBNo2PFEtBNv8fOkt2V3phFYmvIFywsKnqZ6Ga58eo='
WHERE
key_id = 'c23080f2355396cbf4958aaa155acdf53822c48d92d58df9e061099dd53c6865'
AND (
token = '2hBNo2PFEtBNv8fOkt2V3phFYmvIFywsKnqZ6Ga58eo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)