UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5eogTH6ozLuMvZf7ko6WfJgWQlPJOi0mHij/SoNXoHA=' 
WHERE 
  key_id = '9705ad7615e63656972cf822045d6d9f820665ce7218a5732f23f369d8f074ee' 
  AND (
    token = '5eogTH6ozLuMvZf7ko6WfJgWQlPJOi0mHij/SoNXoHA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015