UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rvZC3qCO8jtvaKkA1oj9Il0H5j8JqS50MP+62PpM33U=' 
WHERE 
  key_id = '68aae5f2b8079991fa029e2ad49c2ce0d0ebb917f6aa8db88b9e58d71aa24e52' 
  AND (
    token = 'rvZC3qCO8jtvaKkA1oj9Il0H5j8JqS50MP+62PpM33U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021