UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'icuzRLEU1TnSZBlTTkekHoYrbsdlEKOOBYtFidUgy5U=' 
WHERE 
  key_id = 'faf8676822e6118689a98666c337e704802eae3da4736377dafd0c7dee35de82' 
  AND (
    token = 'icuzRLEU1TnSZBlTTkekHoYrbsdlEKOOBYtFidUgy5U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033