UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Z9M5k3GHFMXXx39LU80DWnFIXe/bA3grYedOOWN/bPk=' 
WHERE 
  key_id = '43803faa6f7983c078cacac796806ccb2bec2ff6d62364539b0dc77604a796e4' 
  AND (
    token = 'Z9M5k3GHFMXXx39LU80DWnFIXe/bA3grYedOOWN/bPk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021