UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V49Q3tT+0LcRYA4S2ngHIYhKjHPxrCNm7uTPwF9f1QQ=' 
WHERE 
  key_id = '68f038bcef5f4c039a5c55a3f1e4dbd692513c7f20b1ef6377cd5667c19aefd7' 
  AND (
    token = 'V49Q3tT+0LcRYA4S2ngHIYhKjHPxrCNm7uTPwF9f1QQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060