UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/jFJKCANaMa9VCYbYuvJoY7dlD2Tqcxzgxl2B13xf/o=' 
WHERE 
  key_id = 'c8506d450f0a303096887781400d97f7b88fbb025e2bb613cec13f4ae4db95a4' 
  AND (
    token = '/jFJKCANaMa9VCYbYuvJoY7dlD2Tqcxzgxl2B13xf/o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032