UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2MEfgRLtk19G4nBfqJVaPBhoZMHmTRd3Kn0OZunQgLY=' 
WHERE 
  key_id = 'df2f9476c2fdaca9d6428fed9f2ca8b2bd4ee88ae7899f1368d0e40ba254c20c' 
  AND (
    token = '2MEfgRLtk19G4nBfqJVaPBhoZMHmTRd3Kn0OZunQgLY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037