UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2h+je6al4sfYrgTw4WspIXOi7ug1fdQ/J0M9Sedvxgc='
WHERE
key_id = '185dc93b503d831a2bc71bb8f882b206ee789d79c11e812a2fa157f3a28b17f9'
AND (
token = '2h+je6al4sfYrgTw4WspIXOi7ug1fdQ/J0M9Sedvxgc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)