UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'POKrYApSHdQ03xzKnkfZsBKaFt2X1yw8Sn/6H5VmByo=' 
WHERE 
  key_id = '83ee096b04f298c6c2ce95ab473b0dfbd015ae305d944c4b04961fda105418ab' 
  AND (
    token = 'POKrYApSHdQ03xzKnkfZsBKaFt2X1yw8Sn/6H5VmByo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026