UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mv70ST160wwC+AJrn7+fi16g2qOYS2BOoa6JPZRTNPw='
WHERE
key_id = '357ed70e5b60829ae16ac28bc15755382b808f277fe36f8ffb383d9277e79f4a'
AND (
token = 'Mv70ST160wwC+AJrn7+fi16g2qOYS2BOoa6JPZRTNPw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)